package com.crm.dto;

import com.crm.domain.Position;

import java.io.Serializable;
import java.util.List;
import java.util.Map;


public class TableDataDto implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 总记录数 */
    private long total;

    /** 列表数据 */
    private List<?> rows;

    /** 消息状态码 */
    private int code;

    /** 消息内容 */
    private String msg;

    private Map<String,Object> params;

    /**
     * 表格数据对象
     */
    public TableDataDto()
    {
    }

    /**
     * 分页
<<<<<<< HEAD
     * 
=======
     *
>>>>>>> origin/dev
     * @param list 列表数据
     * @param total 总记录数
     */
    public TableDataDto(List<?> list, int total)
    {
        this.rows = list;
        this.total = total;
    }

    public TableDataDto(List<Position> postList) {
        this.rows = postList;
        this.total = postList.size();

    }

    public Map<String, Object> getParams() {
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    public long getTotal()
    {
        return total;
    }

    public void setTotal(long total)
    {
        this.total = total;
    }

    public List<?> getRows()
    {
        return rows;
    }

    public void setRows(List<?> rows)
    {
        this.rows = rows;
    }

    public int getCode()
    {
        return code;
    }

    public void setCode(int code)
    {
        this.code = code;
    }

    public String getMsg()
    {
        return msg;
    }

    public void setMsg(String msg)
    {
        this.msg = msg;
    }
}